<?php
/**
 * TODO 将要实现的方法
 * CancelOrder
 * Trade
 * OrderList
 * TradeHistory
 * TransHistory
 * getInfo
 */
require 'config.php';
require 'cls_mysql.php';
$db = new cls_mysql(BTC_DB_HOST,  BTC_DB_USER, BTC_DB_PASS, BTC_DB_NAME);
require 'Lib_btc.php';


//$result = btce_query("Trade", array("pair" => "btc_usd", "type" => "buy", "amount" => 1, "rate" => 10)); //buy 1 BTC @ 10 USD

//$result = btce_query("getInfo");
// $result = btce_query("TransHistory", array("from" => 0, "count" => 10, "order" => 'ASC'));
$result = btce_query("TradeHistory", array("from" => 0, "count" => 10));
//$result = btce_query("OrderList", array("from" => 0, "count" => 10));


echo "<pre>".print_r($result, true)."</pre>";

?>
